home *** CD-ROM | disk | FTP | other *** search
/ GFX Sensations 1 / Graphic Sensations - Volume 1.iso / com_net / bbs / 4dbbsd / docs / text / 12.modem_setup < prev    next >
Encoding:
Text File  |  2000-01-01  |  20.1 KB  |  430 lines

  1. Chapter 12:  Modem Setup
  2.  
  3.  
  4.  
  5.  
  6. 12.1 Overview
  7.  
  8.     In order for 4D-BBS to operate correctly, it must interact with your
  9. modem correctly.  This includes configuring 4D-BBS to know what commands to
  10. send to your modem, and what commands your modem returns.  If these two
  11. options are not setup correctly, 4D-BBS will not be able to accept calls.
  12.  
  13.     This chapter is set up into two parts.  The first part is a
  14. terminology section designed to give novice users information about modem
  15. terms and operations.  The second section goes into detail applying these
  16. terms to 4D-BBS and explaining what the requirements for a modem are and
  17. how it should be setup.
  18.  
  19.     If you are familiar with modems, you may wish to skip the first
  20. section, and go directly to section 12.4, which is the first section
  21. specific to 4D-BBS.
  22.  
  23. 12.2 Modems and Terminology
  24.  
  25.     The word modem is an abbreviation of "MOdulator-DEModulator", and
  26. stands for the action of taking data, changing it into an audible signal,
  27. and then reconverting it back into data.  This is a, of course, a simple
  28. overview of what a modem really does.
  29.  
  30.     There are several different types of modems available today.  Although
  31. most modems are compliant with the original Hayes "AT" command set, there
  32. are several modems which use a derivative of the "AT" command set or use
  33. their own proprietary method.  Because of this when a command is talked
  34. about in this chapter, both the long description and the "AT" equivalent
  35. will be given.  You may have to look up the appropriate command in your
  36. modem's manual if it differs from the "AT" command given.
  37.  
  38. 12.2.1 Speeds
  39.  
  40.     There are basically two classifications of modems used today.  A modem
  41. of 9600 baud or faster is considered a "high speed" modem, whereas a modem
  42. less than 9600 baud is considered a normal modem.  Although this is
  43. certainly not a clear line between the two, the major determining factor is
  44. the speed at which the modem and computer communicate with each other.
  45.  
  46.     There are two types of speeds (or data transfer rates) which need to
  47. be clarified.  The first is called the "serial" rate.  This is the
  48. communication rate at which the modem and computer talk to each other.  The
  49. other rate is called the "carrier" rate, and is the communication rate at
  50. which the modem talks to the other modem.  The two rates do NOT have to be
  51. the same, and as we will see later, normally the serial rate must be faster
  52. than that carrier rate when using advanced features of your modem.
  53.  
  54.     As mentioned above, the two modem classifications are not clearly
  55. defined.  They can overlap, with the main determining factor being whether
  56. the serial rate and the carrier rate are required to be the same.  For high
  57. speed modems, the serial rate is normally "locked" (or set to and never
  58. changed) at a rate which is faster than the highest possible carrier rate.
  59. With earlier modems, the serial rate had to "float" or change whenever the
  60. carrier rate changed.  Since this meant that the computer and modem had to
  61. be constantly switching the rate at which they were communicating data, it
  62. was easy to get them communicating at different rates causing a BBS not to
  63. work properly.
  64.  
  65.     Some modems however have the ability to work both ways.  If they
  66. receive a call at 2400 baud or less, the modem can change the serial rate
  67. to the incoming baud rate.  If the modem receives an incoming call above
  68. 2400, it will keep its serial rate locked at a designated rate.  As a
  69. result of this the user will see a more responsive system.
  70.  
  71.     Another point to make is when two computers are connected using
  72. modems, the serial rate of one computer can be different than the serial
  73. rate of another computer (assuming high speed modems are being used).  It
  74. is the modem's responsibility to act as a transport between the computer
  75. and the other modem.
  76.  
  77.     Below is a chart of common serial and carrier baud rates.  Note that
  78. after 9600, the rates differ.  This is roughly the distinction of the high
  79. speed modem.  The third column below shows the CCITT designated name for
  80. that CARRIER rate.
  81.  
  82.     Serial    Carrier     CCITT
  83.     
  84.     300        300        
  85.     1200        1200        V.22
  86.     2400        2400        V.22bis
  87.     4800        4800
  88.     9600        9600        V.32
  89.  
  90.     19,200    12,000
  91.             14,400    V.32bis
  92.             16,800    (ZyXEL/HST)
  93.             19,200    (ZyXEL)
  94.  
  95.     38,400    28,800    V.Fast
  96.     57,600
  97.     76,800
  98.     115,200
  99.  
  100.  
  101.  
  102.     The CCITT protocols run the SAME speed on both channels the modem can
  103. communicate on.  Theoretically, this means that a bi-directional transfer
  104. could send up to 14.4kbits/second each way when using V.32bis.  Of course
  105. these are in theory and actual transfer speeds would be lower.
  106.  
  107.     It should also be noted that several modems offer a faster or
  108. different carrier rate then those mentioned above.  This is because there
  109. are several proprietary protocol modems available.  Some of these include
  110. ZyXEL, USR, Compucom, Telebit, and Telcor.
  111.  
  112.     Normally these modems will only communicate with each other using the
  113. CCITT 2400 baud protocol, unless they also support a faster CCITT standard
  114. or they are connecting with another modem made by the same manufacturer.
  115.  
  116.     For example, an HST modem by USR can connect to a ZyXEL only at 2400
  117. baud, but can connect to another HST using the HST protocol at 9600 or
  118. 14.4k/sec.  A USR Dual standard can connect to a ZyXEL at 9600 or
  119. 14.4k/sec, since it supports either the V.32 or V.32bis protocol (depending
  120. on the model of the Dual Standard).
  121.  
  122.     An interesting note on the HST protocol is how it is designed.  The
  123. CCITT V.32 and V.32bis protocols, as a noted above, can transfer at full
  124. speed BOTH WAYS.  The HST protocol can only send full speed ONE WAY, while
  125. the other channel is only able to send data at 450bits/second.  This is a
  126. definite caveat to the HST protocol.  On the other hand, some protocols,
  127. like the ZyXEL protocol can transfer on both channels (like the CCITT
  128. protocols).  A ZyXEL modem using the ZyXEL 19.2k protocol can transfer
  129. information at 19.2kbits/second BOTH ways.
  130.  
  131.     Please consult your modem's user guide for information on which
  132. protocols it supports and which modems it can connect to.
  133.  
  134. 12.2.2 Error Correction and Data Compression
  135.  
  136.     There are several different types of error correction techniques used
  137. by modems today.  The most common two are MNP2-4 and LAP-M.  One of the
  138. main advantages of using error correction is that by itself it can give you
  139. a faster transfer rate.  The normal way of transferring information
  140. requires two extra bits besides the normal 8 bits for the data to handle
  141. error detection.  Since the modems themselves handle the error correction,
  142. these extra two bits are not needed any more and stripped by the modems.
  143. This means a theoretical 20% increase in transfer speed.
  144.  
  145.     Similar to error correction, there are several different types of data
  146. compression used in today's modems.  These vary by the maker, but usually
  147. offer similar throughput.  Since data compression and error correction are
  148. normally bundled together (most data compression modes require an error
  149. correction mode to be enabled in order for data compression to operate).
  150. We will discuss them together in their CCITT proposals.
  151.  
  152.     MNP2-4 was the first error correction protocol to be widely accepted.
  153. It was mostly used with 2400-9600 baud modems.  Together with MNP2-4, was
  154. MNP5.  MNP5 is a data compression technique which allows up to a 2:1
  155. compression ratio.  MNP5 does not have the ability to detect data which is
  156. already compressed, and can result in a degradation of throughput when
  157. transferring pre-compressed data.  These two together are called by CCITT
  158. "v.42".
  159.  
  160.     LAP-M was the next error correction protocol to be adopted by the
  161. CCITT.  It had better detection and correction methods than MNP.  It also
  162. has data compression capabilities of up to 4:1.  This is twice that of
  163. MNP5, and LAP-M is intelligent enough to detect a stream of compressed
  164. information and not try and compress it any further.  When CCITT adopted
  165. LAP-M, they packaged it together with V.42, calling it V.42bis.  V.42bis
  166. includes BOTH LAP-M and MNP2-4.  The preferred protocol to use when two
  167. V.42bis modems connect is LAP-M (because of its better features and high
  168. intelligence), but this is normally configurable in the modem.
  169.  
  170. 12.3 Computer-and-Modem Operations
  171.  
  172.     The folloiwng mainly covers high speed modems which are utilizing data
  173. compression.  If you are using a non-high speed modem, you may skip this
  174. section.
  175.  
  176.     Now that you understand some of the different speeds and protocols,
  177. let's talk about what this all means to the computer.  Earlier it was noted
  178. that the computer can talk to the modem at a DIFFERENT rate than the modem
  179. is actually talking to the other modem.  There is a definite reason why
  180. this is needed.
  181.  
  182.     When a modem is using a data compression technique, its needs to get
  183. information from the computer FASTER than it is sending it out to the
  184. modem.  This is only obvious when you think about what data compression
  185. means.  If the computer is NOT getting data faster than it is sending it to
  186. the other modem, then data compression is useless.
  187.  
  188.     Lets look at the below illustration for example:
  189.  
  190.    __________                                         _____________
  191.              \                                       /
  192.               \_____________________________________/
  193.  
  194.    Computer 1   Modem 1 -> Carrier Width <- Modem 2    Computer 
  195.                _____________________________________
  196.               /                                     \
  197.    __________/                                       \_____________
  198.  
  199.  
  200.     Now let's pretend the above is a water pipe, and you are trying to get
  201. the maximum amount of water through the pipe.  In order to get the maximum
  202. amount of flow, you would have to AT LEAST have the same amount of pressure
  203. in the area where Computer 1 is, as is allowed to travel through the
  204. carrier width.  If you do not, then you are not fully utilizing the maximum
  205. bandwith of the carrier.
  206.  
  207.     What does this all mean when related to modems?  Computer 1 must be
  208. able to send information to modem 1 FASTER than modem 1 can send
  209. information to modem 2.  This way modem 1 has a chance to COMPRESS the
  210. data, and send it to modem 2.  When modem 2 gets the information, it will
  211. UNCOMPRESS the data, giving computer 2 information FASTER than the allowed
  212. carrier bandwidth.  This same process can be reversed to show information
  213. flow from computer 2 to computer 1.
  214.  
  215.     What will happen if the computer-to-modem speed is the same as the
  216. modem-to-modem speed?  If data compression is not being used, this will not
  217. cause a problem.  If data compression IS being used, then some conflicts
  218. can arise.
  219.  
  220.     First of all, if the computer only sends data to the modem at the rate
  221. the modem is able to transfer it to the other modem, no problems arise.
  222. But what about when only ONE computer's serial rate is faster than the
  223. carrier rate, or when another's serial rate and carrier rate are the same?
  224. An overrun will occur on the computer which has its serial rate the same as
  225. the carrier rate (again, assuming data compression is being used).  This is
  226. where flow control comes into effect.
  227.  
  228. 12.3.1 Flow Control
  229.  
  230.     Flow control is the action of being able to start and stop the flow of
  231. data between to communication devices.  Here we will talk about flow
  232. control and how it affects modem-to-computer and modem-to-modem
  233. communications.
  234.  
  235.     When a computer is sending information to the modem faster than the
  236. modem can send it out to the other modem (even if data compression is being
  237. used) then the possible situation of the modem's buffer getting full can
  238. occur.  If the computer is not told to stop sending information until the
  239. modem is able to send data out to the other modem, then data can be lost.
  240. This situation can also be reversed to describe the flow of data from the
  241. modem to the computer.
  242.  
  243.     There are two types of common flow control.  The first is called
  244. Xon/Xoff and the other is called RTS/CTS.  Xon/Xoff flow control is two
  245. characters, specifically Control-Q and Control-S.  When a device wants the
  246. other device to stop sending information, they will send an Xoff to that
  247. device.  The device who receives the Xoff will stop sending data until it
  248. receives an Xon.  This method works well in environments which do not have
  249. extra cabling to handle hardware hand-shaking, as we will see below.  A
  250. problem to this method is that it is possible to get garbage characters,
  251. and misinterpret an Xon or Xoff character, causing flow control to not work
  252. properly.  Futhermore, when transferring binary files, it is required by
  253. the transfer protocol to escape or change these characters, so that they
  254. are not misinterpretted.  This means extra overhead for the protocol.
  255.  
  256.     Since Xon/Xoff has some draw backs, a new flow control method was
  257. designed.  This method used two wires in the cable between the two devices
  258. to signal when a device was able to receive information.  This is commonly
  259. called "hardware" flow control.  The two signals which go between the two
  260. devices are labeled Read To Send and Clear To Send (RTS and CTS).  When
  261. talking about computer-to-modem communications, the RTS signal is high when
  262. the computer wants to send to the modem, and the CTS signal is high when
  263. the modem is ready to accept data.  So when the modem's buffer fills up, it
  264. sets the CTS pin to low, temporarily stopping the computer from
  265. transmitting.  Since RTS/CTS is hardware based, protocols do not need to
  266. escape the Xon/Xoff characters (which are normally ignored by the hardware
  267. when RTS/CTS is enabled).
  268.  
  269.     There is one more thing to remember when talking about flow control.
  270. All devices must be using the SAME type of flow control.  It IS possible to
  271. have both RTS/CTS and Xon/Xoff enabled, but this is not normally needed.
  272. If one device is using JUST RTS/CTS and another is using Xon/Xoff flow
  273. control will NOT work.  Not only does this apply to your computer and
  274. modem, is also applies to the OTHER computer and modem you wish to connect
  275. to.  For example:
  276.  
  277. Computer 1 <---> Modem 1 <----------> Modem 2 <---> Computer 2
  278.  
  279. RTS/CTS          RTS/CTS              RTS/CTS        RTS/CTS
  280.  
  281.     If just Computer 1 and Modem 1 are using RTS/CTS, then it's possible
  282. for Computer 2 and Modem 2 to loose information.
  283.  
  284.     If a user calls your BBS with a 2400 baud modem, and you have a 14.4k
  285. modem, they MUST be using some type of hand-shaking if your are locking
  286. your serial rate.  Why would this be?  Your computer is sending information
  287. at 19.2k (assuming your serial rate is locked at 19.2k) to your modem.
  288. Your modem can only send information to the other modem at 2400.  If the
  289. other modem can not tell your modem to pause, then your modem will overrun
  290. the other modem.
  291.  
  292.     If you are running a high speed modem, a nice bulletin warning your
  293. users they need to use RTS/CTS is very helpful to prevent data loss.
  294.  
  295.  
  296. 12.4 Modem Requirements
  297.  
  298.     Below are some of the requirements of a modem in order for it to
  299. operate with 4D-BBS properly.  This is assuming the modem can connect to
  300. the Amiga (whether via the serial port or internal) and either works with
  301. the "serial.device", or has its own "serial.device" compatible device
  302. driver (i.e.  "supra.device", "gvpser.device", etc.).
  303.  
  304.     * Must support the AT command set, or at least the ATA command to
  305. answer the modem.
  306.  
  307.     * Must be able to return the following result codes:
  308.  
  309.         RING                When a call is coming in.
  310.         CONNECT XXXXX        Connection to another modem.
  311.         NO CARRIER        Aborted connect.
  312.  
  313.     * Should be able to report the CARRIER speed when reporting the
  314. connect string (i.e.  CONNECT 14400, not CONNECT 19200).
  315.  
  316.     * Must be able to report via the DCD pin whether a carrier is present
  317. or not.
  318.  
  319.     * Should be able to drop carrier when the DTR pin goes high-to-low or
  320. be able to hangup using the "+++,,,ATH" command.
  321.  
  322.     * Should be able to support RTS/CTS hardware hand-shaking.
  323.  
  324.     * Should be able to return verbose commands, not terse.
  325.  
  326.     * Should be able to not echo commands sent to it.
  327.     
  328. 12.5 Configuring the Modem
  329.  
  330.     The first step is to configure how 4D-BBS will interact with your
  331. modem.  There are several settings which can be altered, along with
  332. different options you may select.
  333.  
  334.     In the Configuration Editor on the Modem Setup screen, there are 13
  335. settings which need to be talked about.  They are as listed below:
  336.  
  337. High Baud:  This is the highest possible serial rate both your computer and
  338. the modem can handle.  This is also the baud rate at which the BBS will
  339. initially setup the modem.  If your modem has non-volatile memory and you
  340. are saving settings to your modem for the BBS, then you should have your
  341. terminal set at this baud rate before you save the settings into the
  342. modem's memory.  This is also the baud rate the BBS will try to
  343. re-initialize the modem at after every call.  If the reset baud option is
  344. set to Yes (see below) then this is the baud rate which the BBS will try
  345. and reset to.
  346.  
  347.             The default for this depends on your modem.  A high speed
  348. modem should use 19200 or 38400, while a 2400 should use 2400.
  349.  
  350. Low Baud:  This is the lowest available baud rate which the BBS supports.
  351. If a connection comes in slower than this rate, the BBS will simply hangup
  352. and go back to the wait screen.
  353.  
  354. Ser Device:  This is the serial device driver which the BBS will try and
  355. use.  This file must exist in your "Devs:" directory.  The default for this
  356. is "serial.device".
  357.  
  358. Auto Detect:  When the auto detect mode is enabled, the BBS will expect to
  359. receive standard verbose information from your modem.  The two main result
  360. codes are "RING" for an incoming call and "OK" when a good command was
  361. sent.
  362.  
  363. Drop DTR:  The BBS and your modem must be setup to support the same mode
  364. for hanging up.  There is three different settings for this:
  365.  
  366.         0 The BBS will not try to hangup the modem.  This should only be
  367. used inconjunction with the "/o" parameter, to allow the calling program to
  368. either continue using the current connection, or allow the calling program
  369. to hang up the modem itself.
  370.  
  371.         1 The BBS will close the serial device, pause, and then re-open
  372. the serial device in order to drop the DTR.
  373.  
  374.         2 The BBS will use the escape sequence method of "+++", 2 second
  375. pause, "ATH" in order to hangup the phone.
  376.  
  377.         The default for this is 1.
  378.  
  379. Local Off:  When you log onto the BBS with either the F1 or F10 keys (or
  380. equivalent pull down menu options) this option will instruct the BBS to
  381. send a "ATH1" option, to send the modem off-hook.  This will give your BBS
  382. a busy signal while you are on the BBS.  You can also run a second copy of
  383. the BBS to logon, in order to avoid this.  The default is No.
  384.  
  385. Reset Baud:  When the "/b" command line parameter is NOT given to the BBS,
  386. its serial rate will "float" to match the incoming carrier rate.  Set this
  387. option to Yes if you want to have your modem return to the serial rate
  388. specified by the high baud option above.  If you wish for your modem to
  389. stay at the incoming caller's baud rate until a new incoming call changes
  390. it, specify No here.  The default is No.
  391.  
  392. Ser Unit:  This is the unit of the serial device specified in the "Ser
  393. Device" option which the BBS will use.  The default is 0.
  394.  
  395. Connect Str:  If the Auto Detect option is turned on, this is the string
  396. the BBS will look for to determine when a connection has been made.  Your
  397. modem must return this as the FIRST part of the connect string.  The BBS
  398. will parse the number IMMEDIATELY following the string and assume that is
  399. the carrier rate.  The default for this is "CONNECT".
  400.  
  401. Buffer Size:  This is the buffer size for the serial port.  Normally a
  402. buffer size of 4k is sufficient.  High speed modems might want to use a
  403. larger buffer size to make transfers less choppy.  The default is 4096.
  404.  
  405. ARQ Str:  When a reliable connection is made, the BBS needs to know this in
  406. order to calculate transfer times accurately.  This string can appear
  407. ANYWHERE in the string which begins with the connect string specified
  408. above.  The default is "ARQ".
  409.  
  410. Fax String:  If your modem has fax capabilities and is able to distinguish
  411. between a fax and a data call, set this to the string which your modem will
  412. return when it detects an incoming fax.  This is NOT the complete string,
  413. and the BBS will search for this string inside of the result string.  The
  414. default is "FAX".
  415.  
  416. Init String:  This is the string which the BBS will send out to the modem
  417. when starting up, and after each call.  The BBS expects to receive either
  418. an "OK" or a "0" back from the modem after sending this string.
  419.  
  420.         Certain characters in this string are translated by the BBS.
  421. They are:
  422.  
  423.         ~ Pause for 1.5 seconds
  424.         | Send a Return
  425.         ^ Hangup the modem (Defined by drop DTR setting)
  426.  
  427. The default string is "~|AT|" (Wait 1.5 seconds, send a return, AT, and
  428. another return).
  429.  
  430. 12.6 YSMTG (Yet Still More TO Go!)